package com.jinglephone.sdk;

/**
 * SIP 常量定义
 *
 * @author mos
 * @date 2016.05.27
 */
public class SipConst {
    /**
     * 呼叫状态
     */
    // 来电
    public static final String CALL_STATE_INCOMING = "csIncoming";
    // 正在连接服务器(SIP信令：1 - 5阶段)
    public static final String CALL_STATE_CONNECTING = "csConnecting";
    // 正在呼叫(SIP信令：6 - 9阶段)
    public static final String CALL_STATE_CALLING = "csCalling";
    // 对方正在响铃(SIP信令：10阶段)
    public static final String CALL_STATE_REMOTE_RINGING = "csrRinging";
    // 对方已接听(SIP信令：11 - 12阶段)
    public static final String CALL_STATE_REMOTE_ANSWER = "csrAnswer";
    // 已挂断
    public static final String CALL_STATE_REMOTE_HANG = "csrHang";

    /**
     * 注册状态
     */
    // 开始注册
    public static final String REG_STATE_START = "rsStart";
    // 已经注册
    public static final String REG_STATE_COMPLETE = "rsComplete";
    // 注册中断
    public static final String REG_STATE_END = "rsEnd";

    /**
     * 注册失败原因
     */
    // 无效用户
    public static final String REG_FAIL_INVALID_USER = "rfInvalidUser";
    // 密码错误
    public static final String REG_FAIL_WRONG_PASSWORD = "rfWrongPassword";
    // 网络不可用
    public static final String REG_FAIL_NO_NETWORK = "rfNoNetwork";
    // 连接超时
    public static final String REG_FAIL_CONNECTION_TIMEOUT = "rfConnectionTimeout";
    // 本地IP获取异常
    public static final String REG_FAIL_IP_ABNORMAL = "rfIpAbnormal";

    public static final String REG_FAIL_MANUAL_STOP = "rfManualStop";

    /**
     * 无效参数
     */
    public static final String INVALID_PARAMETER =  "InvalidParameter";
    /**
     * SIP 编码
     */
    // G729
    public static final String SIP_CODEC_G729 = "G729";
    // G711U
    public static final String SIP_CODEC_PCMU = "PCMU";
    // iLBC
    public static final String SIP_CODEC_iLBC = "iLBC";


    /**
     * 挂断原因
     */
    // 正常挂断
    public static final String HANG_REASON_NORMAL = "hrNormal";
    // 断网挂断
    public static final String HANG_REASON_NO_NETWORK = "hrNoNetwork";
    // SIP服务器挂断
    public static final String HANG_REASON_SIP_SERVER_HANG = "hrSipServerHang";
}

